<template>
  <div class="register-wrap">
    <el-dialog :visible.sync="isShowRegisterDialog" class="register-dialog" @close="closeDialog">
      <div class="title">请完善信息并注册，我们将尽快与您联系</div>
      <el-form ref="registerForm" :model="registerForm" label-width="80px" class="register-form">
        <el-form-item label="公司/院校名称" class="form-style">
          <el-input v-model="registerForm.name" placeholder="请输入公司/院校名称"></el-input>
        </el-form-item>
        <el-form-item label="组织机构代码" class="form-style">
          <el-input v-model="registerForm.organize" placeholder="请输入组织机构代码"></el-input>
        </el-form-item>
        <el-form-item label="联系人" class="form-style">
          <el-input v-model="registerForm.contactEmail" placeholder="请输入联系人姓名"></el-input>
        </el-form-item>
        <el-form-item label="联系人邮箱" class="form-style">
          <el-input v-model="registerForm.email" placeholder="请输入联系人邮箱"></el-input>
        </el-form-item>
        <el-form-item label="联系人电话" class="form-style">
          <el-input v-model="registerForm.phone" placeholder="请输入联系人电话"></el-input>
        </el-form-item>
        <el-form-item label="密码" class="form-style">
          <el-input v-model="registerForm.password" placeholder="请输入密码" type="password"></el-input>
        </el-form-item>
        <el-form-item class="btn">
          <el-button type="primary" @click="onSubmit">注册</el-button>
        </el-form-item>
      </el-form>
    </el-dialog>
  </div>
</template>
<script>
export default {
  data () {
    return {
      isShowRegisterDialog: true, // 是否显示注册弹框
      registerForm: { // 注册form
        name: '',
        organize: '',
        contactEmail: '',
        email: '',
        phone: '',
        password: ''
      }
    }
  },
  methods: {
    // 关闭注册弹框
    closeDialog () {
      this.$emit('closeDialog', false)
    },
    // 提交注册
    onSubmit () {
      this.$emit('closeDialog', false, 'success')
    }
  }
}
</script>
<style lang="stylus" scoped>
.register-wrap {
  .register-dialog {
    /deep/ .el-dialog__headerbtn {
      width: 16px;
      height: 16px;
      i {
        &:hover {
          color: #4676FE
        }
      }
    }
    /deep/ .el-dialog {
      width: 480px;
      height: 480px;
      border-radius: 16px;
    }
    /deep/ .el-dialog__header {
      padding: 0
    }
    /deep/ .el-dialog__body {
      padding: 21px 0 11px
    }
    .title {
      font-size: 20px;
      font-family: SourceHanSansCN-Medium, SourceHanSansCN;
      font-weight: 500;
      color: #101010;
      line-height: 20px;
      padding-bottom: 20px;
      border-bottom: 1px solid #F1F1F1;
      padding-left: 20px
    }
    .register-form {
      .form-style {
        display: flex;
        justify-content: flex-end;
        margin-top: 20px;
        margin-bottom: 0;
        height: 36px;
        align-items: center;
        padding-right: 72px
        &:nth-child(even) {
          margin-right:0
        }
        /deep/ .el-form-item__label {
          width: auto !important;
          font-size: 14px;
          font-family: SourceHanSansCN-Regular, SourceHanSansCN;
          font-weight: 400;
          color: #767676;
          text-align: left;
          line-height: 38px;
          padding-right: 16px;
        }
        /deep/ .el-form-item__content {
          margin-left: 0 !important
        }
        /deep/ .el-input__inner {
          width: 230px;
          height: 36px;
          line-height: 36px;
          background: #FAFAFA;
          border-radius: 4px;
          border: 1px solid #F1F1F1;
        }
        /deep/ .el-input__inner:hover {
          border-color: #4676FE
        }
      }
      .btn {
        width: 100%;
        text-align: center;
        margin-bottom: 0;
        margin-top: 20px;
        border-top: 1px solid #F1F1F1;
        /deep/ .el-form-item__content {
          margin-left: 0 !important;
        }
        /deep/ .el-button {
          width: 150px;
          height: 40px;
          background: #4676FE;
          border-radius: 4px;
          border: none;
          margin-top: 11px;
          font-size: 16px;
          font-family: SourceHanSansCN-Regular, SourceHanSansCN;
          font-weight: 400;
          color: #FFFFFF;
          &:hover {
            background: #1D45B8
          }
        }
      }
    }
  }
}
</style>